Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To copy-paste onto release note:
20 days since our past release. Is Lexical dead? ☠️
Not quite, we've been busy working on this meaty 0.5 release that we hope you'll enjoy. (Side note: Lexical nightly versions coming soon, more info below).
Draggable blocks
One of the most beloved features of Notion is the ability to seamlessly move blocks within the same document. @LuciNyan has ported this behavior to Lexical under the DraggableBlockPlugin name. You can check it out in our playground!
2022-09-14.23.41.11.mov
LexicalTablePlugin makes its way to Meta production
We started our tables (@lexical/react/LexicalTablePlugin) development at the start of the year, one of the most ambitious and complex plugins we have built for rich text. We have blocked a good amount of time during this past month to work with multiple internal teams to identify and squash most of these (10+) high-pri bugs that make the experience unideal and we believe they are now in a good shape to meet their first internal users.
Shadow Root
We have introduced a new advanced concept for Lexical ElementNodes:
[Shadow Root](https://lexical.dev/docs/api/classes/lexical.ElementNode#isshadowroot)
. A Shadow Root is a Node that behaves like a root (we stole the name from Shadow DOM). This method enables you to have complex deep rich text hierarchies where children node shouldn't see beyond the parent. For example, the cell node content.$insertNodes with NodeSelection and GridSelection support
We introduced a seamless way to handle node insertion. We bundled
{rangeSelection/nodeSelection/gridSelection}.insertNode
into just one method:$insertNodes
. We also added insertNodes support for NodeSelection and GridSelection that was previously not supported.Screen.Recording.2022-07-13.at.3.37.18.pm.mov
Various API changes
initialEditorState
. We found that this is unintuitive to handle nested editors and harder to control SSR-enabled pages. Instead, MLCComposer will take and apply theinitialEditorState
on editor creationlexical
package, it serves a very specific use case and it's redundant for plain text.Lots of bugfixes
Release automation: nightly releases
We listened to your (mostly Discord) feedback, you want to have the latest, more frequently, especially when some of you are heavily involved into the development and growth of the Lexical framework.
The reality is, we didn't choose to postpone releases for 2 weeks. It has mostly been a lack of automation and making sure we bundle breaking API changes to avoid developer churn.
We know that there's no one-size-fits-all when it comes to developers, and that's why we want to offer different ways to play with the library, what we have now, a slow-ish but less time-consuming (for you) release cycle but also offer nightly releases that would happen automatically once per day and would include the very latest of the development.
The work is still under development but we plan to start this soon, stay tuned!
Changelog